package com.tiancai.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum PayType {
    // 0-购买 1-租赁
    BUY(0, "购买"),
    RENT(1, "租赁");

    /**
     * 存到数据库的key
     */
    @EnumValue
    private Integer key;
    /**
     * 显示给用户的value
     */
    @JsonValue
    private String name;

    PayType(Integer key, String name) {
        this.key = key;
        this.name = name;
    }
}
